<?php
$ArPerguntas = Dracosys::getSessionValue(SESSION_INTERFACE, 'QuestionsList');
?>
<section id="QuestionList">
    <h2>Perguntas Frequentes</h2>
    <table id="QuestionList_question" class="list">
        <thead>
            <tr>
                <th>Título</th>
                <th>Usuario</th>
                <th>Visualizar</th>
            </tr>
        </thead>
        <tfoot>
        </tfoot>
        <tbody>
            <?php
            if( !empty($ArPerguntas) ):
                foreach($ArPerguntas as $Question): ?>
                    <tr>
                        <td><?=$Question->getStTitulo()?></td>
                        <td><?=$Question->getUsuario()->getArDadosUsuario('StNome')?></td>
                        <td>
                            <a href="<?=DRA_URL?>faq/visualizar/id/<?=$Question->getIDFaq()?>" title="Visualizar">
                                <img src="<?= DRA_VIEW_URL ?>images/descricao.png" />
                            </a>
                        </td>
                    </tr>
            <?php
                endforeach;
            else:
                ?>
                <tr class="nodata">
                    <td colspan="3">
                        Nenhum resultado foi encontrado!
                    </td>
                </tr>
                <?php
            endif;
            ?>
        </tbody>
    </table>
</section>